﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="ManageMaintainLevel.ascx.vb"
    Inherits="WebForm_ManageProduct_ManageMaintainLevel" %>

<script type="text/javascript">
function CheckOtherIsCheckedByGVID(spanChk)
       {            

           var IsChecked = spanChk.checked;        
           if(IsChecked)
              {
                 spanChk.parentElement.parentElement.style.backgroundColor='LightGreen'; 
                 spanChk.parentElement.parentElement.style.color='Black';
              }                   
             
           var CurrentRdbID = spanChk.id;   
           var Chk = spanChk;
           var items = document.getElementsByTagName('input');            

           for(i=0;i<items.length;i++)
           {               
                  if(items[i].id != CurrentRdbID && items[i].type=="radio")

                  {           
                      if(items[i].checked)

                      {    
                          items[i].checked = false;
                          items[i].parentElement.parentElement.style.backgroundColor='White';
                          items[i].parentElement.parentElement.style.color='Black';
                      }

                  }

           }

       }
</script>

<div style="background-color: #351D26">
    <fieldset id="plDivision" style="border-color: #4E333B" runat="server">
        <legend class="white2">
            <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:plDivision.GroupingText%>" />
        </legend>
        <table width="50%" cellpadding="0" cellspacing="0">
            <tr>
                <td align="right">
                    <asp:Label ID="lblDivision" runat="server" meta:resourcekey="lblDivision"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlDivision" runat="server">
                    </asp:DropDownList>
                <td>
                <td align="right">
                    <asp:Label ID="lblViewPoint" runat="server" meta:resourcekey="lblViewPoint"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlViewPoint" runat="server">
                    </asp:DropDownList>
                </td>
                <td>
                    <asp:RequiredFieldValidator ID="rfvDivision" runat="server" meta:resourcekey="rfvDivision"
                        SetFocusOnError="true" ValidationGroup="vSelect" ControlToValidate="ddlDivision"
                        Display="None"></asp:RequiredFieldValidator>
                    <asp:RequiredFieldValidator ID="rfvViewPoint" runat="server" meta:resourcekey="rfvViewPoint"
                        SetFocusOnError="true" ValidationGroup="vSelect" ControlToValidate="ddlViewPoint"
                        Display="None"></asp:RequiredFieldValidator>
                    <asp:Button ID="btSubmit" runat="server" meta:resourcekey="btSubmit" ValidationGroup="vSelect" />
                    <asp:ValidationSummary ID="vs1" ValidationGroup="vSelect" runat="server" ShowMessageBox="true"
                        ShowSummary="false" />
                </td>
            </tr>
        </table>
    </fieldset>
    <fieldset id="plList" visible="false" style="border-color: #4E333B" runat="server">
        <legend class="white2">
            <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:plList.GroupingText%>" />
        </legend>
        <table width="100%" cellpadding="0" cellspacing="0"">
            <tr>
                <td width="95%" align="center">
                    <My:MyGridView ID="gv" runat="server" SkinID="pager" AllowPaging="True" DataKeyNames="ID">
                        <Columns>
                            <asp:TemplateField HeaderText="Select">
                                <itemtemplate>
                                <input id="Radio" type="radio" name="RowSelected" value='<%# Eval("ID") %>' runat="server"
                                    onclick="CheckOtherIsCheckedByGVID(this);" />
                                <asp:Label ID="lblCheck" SkinID="infor" runat="server" Text='<%# Eval("IsCheck") %>' Visible="false"></asp:Label>
                            </itemtemplate>
                                <itemstyle horizontalalign="Center" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Level">
                                <itemtemplate>
                                <asp:Label ID="lblLevel" SkinID="infor" runat="server" Text='<%# Eval("LevelNumber") %>'></asp:Label>
                            </itemtemplate>
                                <itemstyle horizontalalign="Center" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="HierarchyName" HeaderText="HierarchyName" ItemStyle-HorizontalAlign="Left" />
                            <asp:TemplateField HeaderText="Visible">
                                <itemtemplate>
                                <asp:CheckBox ID="chkSelect" runat="server" />
                                <asp:Label ID="lblSelect" SkinID="infor" runat="server" Text='<%# Eval("IsSelect") %>' Visible="false"></asp:Label>
                            </itemtemplate>
                                <itemstyle horizontalalign="Center" />
                            </asp:TemplateField>
                        </Columns>
                    </My:MyGridView>
                </td>
                <td>
                    <asp:Button ID="btnup" meta:resourcekey="btnup" runat="server" Visible="false" />
                    <br/><br/>
                    <asp:Button ID="btndown" meta:resourcekey="btndown" runat="server" Visible="false" />
                </td>
            </tr>
            <tr>
                <td align="center">
                    <asp:Button ID="btnApply" runat="server" meta:resourcekey="btnApply" Visible="false" />
                    <asp:Button ID="btnCancel" runat="server" meta:resourcekey="btnCancel" Visible="false" />
                </td>
            </tr>
        </table>
    </fieldset>
</div>
